package com.kangye.game.controller;

import com.alibaba.fastjson.JSON;
import com.kangye.game.service.DelService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.crypto.interfaces.PBEKey;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: game_orders
 * @description: 删除控制器
 * @author: lys
 * @create: 2021-09-01 20:59
 **/
@RestController
@CrossOrigin
public class DeleteController {
    @Resource
    private DelService delService;

    @RequestMapping("/delTUser.action")
    public Object delTUser(Integer id) {
        Integer i = delService.delTUser(id);
        Map<String, String> map = new HashMap<>();
        if (i != 0) {
            String code = JSON.toJSONString("200");
            map.put("code", code);
        } else {
            String code = JSON.toJSONString("400");
            map.put("code", code);
        }
        return map;
    }
}
